#define _CRT_SECURE_NO_WARNINGS
#include"list.h"
int main()
{
	List* head = NULL;
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		int num = 0;
		cin >> num;
		addlist(&head, num);
	}
	int k = 0;
	cin >> k;
	k_list(&head, k);
	system("pause");
}